package demo2.service;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import demo2.common.domain.OrderSaveLog;
import demo2.common.util.UUIDGenerator;
import demo2.dao.IDemoDao;
import demo2.dao.impl.DemoDao;


/**
 * 
 * 
 * 
 * <pre>
 * HISTORY
 * ****************************************************************************
 *  ID    DATE            PERSON            REASON
 *  1     2017年10月28日         01367604           Create
 * ****************************************************************************
 * </pre>
 * 
 * @author 01367604
 * @version 1.0
 */
public class DemoService {

    public static void main(String[] args) {
        IDemoDao dao = new DemoDao();
        List<OrderSaveLog> orderSaveLogList = new ArrayList<>();
        OrderSaveLog orderSaveLog = new OrderSaveLog();
        orderSaveLog.setOrderSaveLogId(UUIDGenerator.generate());
        orderSaveLog.setOrderNo("00100000000007537217479869");
        orderSaveLog.setType("main");
        orderSaveLog.setCreateTime(new Date());
        orderSaveLog.setProcessCount(1);
        OrderSaveLog orderSaveLog2 = new OrderSaveLog();
        orderSaveLog2.setOrderSaveLogId(UUIDGenerator.generate());
        orderSaveLog2.setOrderNo("00100000000007537217479869");
        orderSaveLog2.setType("main");
        orderSaveLog2.setCreateTime(new Date());
        orderSaveLog2.setProcessCount(2);
        orderSaveLogList.add(orderSaveLog);
        orderSaveLogList.add(orderSaveLog2);

        dao.insert(orderSaveLog);
        dao.insertBatch(orderSaveLogList);
    }

}
